package com.imooc.utils;


import org.springframework.util.DigestUtils;

public class MD5Utils {
    public static String md5Digest(String source, Integer salt) {
        char[] chars = source.toCharArray();
        for (int i = 0; i < chars.length; i++) {
            chars[i] = (char) (chars[i] + salt);
        }
        return DigestUtils.md5DigestAsHex(new String(chars).getBytes());
    }
}
